/// 主题化滚动条
/// @param {string} $track-color - 轨道颜色变量名
/// @param {string} $thumb-color - 滑块颜色变量名
@mixin themed-scrollbar(
  $width: 0.625rem,
  $track-color: '--el-bg-color',
  $thumb-color: '--el-color-info',
  $thumb-radius: 0.3125rem
) {
  &::-webkit-scrollbar {
    width: $width;
  }

  @include useTheme {
    &::-webkit-scrollbar-track {
      background: getStyle($track-color);
    }

    &::-webkit-scrollbar-thumb {
      background: getStyle($thumb-color);
      border-radius: $thumb-radius;
    }
  }

  // Firefox 支持
  scrollbar-width: thin;
  @include useTheme {
    scrollbar-color: getStyle($thumb-color) getStyle($track-color);
  }
}
